package com.atguigu.exam.service;

import com.atguigu.exam.entity.ExamRecord;
import com.atguigu.exam.vo.StartExamVo;
import com.atguigu.exam.vo.SubmitAnswerVo;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;

/**
 * 考试服务接口
 */
public interface ExamService extends IService<ExamRecord> {

    /**
     * 开始考试
     *
     * @param startExamVo
     * @return
     */
    ExamRecord startExam(StartExamVo startExamVo);

    /**
     * 根据ID获取考试记录详情
     *
     * @param id
     * @return
     */
    ExamRecord getExamRecordById(Integer id);

    /**
     * 提交答案
     *
     * @param examRecordId
     * @param answers
     */
    void submitAnswers(Integer examRecordId, List<SubmitAnswerVo> answers) throws InterruptedException;


    /**
     * AI判卷
     * @param examRecordId
     * @return
     */
    ExamRecord gradeExam(Integer examRecordId) throws InterruptedException;
}
 